import { baseURL } from "./config"
export default function request(options) {
    return new Promise((resolve, reject) => {
        wx.request({
          url: baseURL + options.url,
          header: options.header || {},
          method: options.method || 'get',
          timeout: options.timeout || 5*60*1000,
          // timeout: options.timeout || 60000,
          data: options.data || {},
          success: resolve,
          fail: reject
        })
    })
}